<template>
  <div class="header-box">
    <div class="left-header">


      <el-button
      @click="menuButton()"
        class="left-header-button"
        icon="el-icon-menu"
        size="mini"
      ></el-button>


      <!-- 面包屑 -->
  <el-breadcrumb separator="/">
  <el-breadcrumb-item v-for="item in tags" :key="item.path" :to="{ path: item.path }">{{ item.label }}</el-breadcrumb-item>
</el-breadcrumb>




    </div>
    <div class="right-header">
      <el-dropdown>
        <span class="el-dropdown-link">
          <img class="header-user" src="@/assets/logo.png" alt="" />
        </span>
        <el-dropdown-menu slot="dropdown">
          <el-dropdown-item>用户中心</el-dropdown-item>
          <el-dropdown-item>退出</el-dropdown-item>
        </el-dropdown-menu>
      </el-dropdown>
    </div>
  </div>
</template>


<script>
import { mapState } from 'vuex';

export default {
  methods:{
    menuButton(){
      this.$store.commit('collapseMenu')
    }
  },
  computed:{
    ...mapState({
      tags:state=>state.tab.tabList
    })
  }

}
</script>



<style scoped>
.header-box {
  padding: 0 20px;
  color: #fff;
  background-color: #555;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.left-header{
  display: flex;
  align-items: center;
  justify-content: center;
}
.left-header-button{
  margin-right: 10px;
}
.left-header-text {
  margin-left: 10px;
}
.header-user {
  width: 40px;
  height: 40px;
}
</style>
